<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>待评价</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/dropload.css" rel="stylesheet" type="text/css" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/waiting-comment.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <ul class="nav-bar">
        <li><a href="my-comment.html">我的评价</a></li>
        <li class="last"><a class="active" href="javascript:;">待评价</a></li>
    </ul>
    <div class="container">
        <div id="list-dom"></div>
    </div>
    <script id="list" type="text/html">
        {{each list}}
        <div class="card">
            <a href="house.html?id={{ $value.id }}">
                <div class="card-head">
                    <img class="card-media" src="{{ $value.pic }}" />
                    <div class="card-head-title">&yen;{{ $value.money }}/月</div>
                    <div class="card-head-mask"></div>
                </div>
                <div class="comment-item">
                    <div class="comment-image">
                        <img src="{{ $value.logo }}" class="avatar-thumb" />
                    </div>
                    <div class="comment-info">
                        <strong>{{ $value.username }}</strong>
                        <div class="star-bar">
                            {{ $value.star | star }} 评分
                            <span class="font-blue">{{ $value.star }}分</span>
                        </div>
                        <a href="evaluate.html"><label class="yellow">评价</label></a>
                        <div class="title-bar">
                            <i class="icon icon-location-gray"></i>
                            <span class="title-bar-title">{{ $value.neighbourhood_name }}</span>
                        </div>
                        <div class="datetime">{{ $value.create_time }}</div>
                    </div>
                    <div class="clear-fix"></div>
                </div>
            </a>
        </div>
        {{/each}}
    </script>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/dropload.min.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            // 页数
            var page = 0;
            // 每页展示5个
            var limit = 5;

            // 房源列表下拉加载更多
            $('.container').dropload({
                scrollArea: window,
                loadDownFn: function(me) {
                    page++;

                    bee.request({
                        url: '/Member/Index/to_comment',
                        data: {
                            page: page,
                            limit: limit
                        },
                        success: function(result) {
                            if (result.list.length) {
                                bee.template('list', result);
                            } else {
                                me.lock();
                                me.noData();
                            }
                            me.resetload();
                        }
                    });
                }
            });
        });
    </script>
</body>

</html>
